import axios from '../utils/request.js'

const base = {
    baseUrl: '/api',
    hostLogin:'/api/hostLogin',//主持人登录
    newLogin:'/api/newLogin',//新人登录
    plannerLogin:'/api/plannerLogin',//策划师登录
    companyLogin:'/api/companyLogin',//婚庆公司登录
    register:'/api/register',//注册
    loginback:'/api/loginback',//后台登录
    total:'/api/total',//分页总数
    insertAdmin:'/api/insertAdmin',//添加管理员
    deleteAdmin:'/api/deleteAdmin',//删除管理员
    updateAdmin:'/api/updateAdmin',//编辑管理员
    searchAdmin:'/api/searchAdmin',//查询管理员
    insertHost:'/api/insertHost',//添加主持人
    deleteHost:'/api/deleteHost',//删除主持人
    updateHost:'/api/updateHost',//编辑主持人
    searchHost:'/api/searchHost',//查询主持人
    insertWedding:'/api/insertWedding',//添加婚庆公司
    deleteWedding:'/api/deleteWedding',//删除婚庆公司
    updateWedding:'/api/updateWedding',//编辑婚庆公司
    searchWedding:'/api/searchWedding',//查询婚庆公司
    searchNewPeople:'/api/searchNewPeople',//查询新人
    searchPlanner:'/api/searchPlanner',//查询策划师
    searchOrder:'/api/searchOrder',//查询主持人订单
    insertBanner:'/api/insertBanner',//添加banner
    deleteBanner:'/api/deleteBanner',//删除banner
    updateBanner:'/api/updateBanner',//编辑banner
    searchBanner:'/api/searchBanner',//查询banner
    insertPartner:'/api/insertPartner',//添加合作伙伴
    deletePartner:'/api/deletePartner',//删除合作伙伴
    updatePartner:'/api/updatePartner',//编辑合作伙伴
    searchBPartner:'/api/searchPartner',//查询合作伙伴
    about: '/api/about', //关于我们
    joinus: '/api/joinus', //加入我们
    swiperimg:'/api/swiperimg',//首页轮播图
    recommend:'/api/recommend',//每日推荐
    list:'/api/list',//排行榜,
    partner:'/api/partner',//合作伙伴,
    hostlist:'/api/hostlist',//主持人
    hostCenter:"/api/hostCenter",//个人中心-主持人，
    companyCenter:"/api/companyCenter",//个人中心-公司、策划师

}

const api = {
    about() {
        return axios.get(base.baseUrl + base.about);
    },
    joinus() {
        return axios.get(base.baseUrl + base.joinus)
    },
    swiperimg() {
        return axios.get(base.baseUrl + base.swiperimg)
    },
    recommend(){
        return axios.get(base.baseUrl+base.recommend)
    },
    list(){
        return axios.get(base.baseUrl+base.list)
    },
    partner(){
        return axios.get(base.baseUrl+base.partner)
    },
    hostlist(){
        return axios.get(base.baseUrl+base.hostlist)
    },
    // 后台登录
    getHostLogin(params){
        return axios.post(base.baseUrl + base.hostLogin,params)
    },
    getNewLogin(params){
        return axios.post(base.baseUrl + base.newLogin,params)
    },
    getPlannerLogin(params){
        return axios.post(base.baseUrl + base.plannerLogin,params)
    },
    getCompanyLogin(params){
        return axios.post(base.baseUrl + base.companyLogin,params)
    },
    getLoginBack(params){
        return axios.post(base.baseUrl + base.loginback,params)
    },
    //注册
    getRegister(params){
        return axios.post(base.baseUrl + base.register,params)
    },

    getTotal(){
        return axios.get(base.baseUrl + base.total)
    },
    //添加管理员
    getInsertAdmin(params){
        return axios.get(base.baseUrl + base.insertAdmin, {params})
    },
    //删除管理员
    getDeleteAdmin(params){
        return axios.get(base.baseUrl + base.deleteAdmin, {params})
    },
    //编辑管理员
    getUpdateAdmin(params){
        return axios.get(base.baseUrl + base.updateAdmin, {params})
    },
    //查询管理员
    getSearchAdmin(params){
        return axios.get(base.baseUrl + base.searchAdmin, {params})
    },
    //添加主持人
    getInsertHost(params){
        return axios.get(base.baseUrl + base.insertHost, {params})
    },
    //删除主持人
    getDeleteHost(params){
        return axios.get(base.baseUrl + base.deleteHost, {params})
    },
    //编辑主持人
    getUpdateHost(params){
        return axios.get(base.baseUrl + base.updateHost, {params})
    },
    //查询主持人
    getSearchHost(params){
        return axios.get(base.baseUrl + base.searchHost, {params})
    },
    //添加婚庆公司
    getInsertWedding(params){
        return axios.get(base.baseUrl + base.insertWedding, {params})
    },
    //删除婚庆公司
    getDeleteWedding(params){
        return axios.get(base.baseUrl + base.deleteWedding, {params})
    },
    //编辑婚庆公司
    getUpdateWedding(params){
        return axios.get(base.baseUrl + base.updateWedding, {params})
    },
    //查询婚庆公司
    getSearchWedding(params){
        return axios.get(base.baseUrl + base.searchWedding, {params})
    },
    //查询新人
    getSearchNewPeople(params){
        return axios.get(base.baseUrl + base.searchNewPeople, {params})
    },
    //查询主持人
    getSearchPlanner(params){
        return axios.get(base.baseUrl + base.searchPlanner, {params})
    },
    //查询主持人订单
    getSearchOrder(params){
        return axios.get(base.baseUrl + base.searchOrder, {params})
    },
    //添加banner
    getInsertBanner(params){
        return axios.get(base.baseUrl + base.insertBanner, {params})
    },
    //删除banner
    getDeleteBanner(params){
        return axios.get(base.baseUrl + base.deleteBanner, {params})
    },
    //编辑banner
    getUpdateBanner(params){
        return axios.get(base.baseUrl + base.updateBanner, {params})
    },
    //查询banner
    getSearchBanner(params){
        return axios.get(base.baseUrl + base.searchBanner, {params})
    },
    //添加合作伙伴
    getInsertPartner(params){
        return axios.get(base.baseUrl + base.insertPartner, {params})
    },
    //删除合作伙伴
    getDeletePartner(params){
        return axios.get(base.baseUrl + base.deletePartner, {params})
    },
    //编辑合作伙伴
    getUpdatePartner(params){
        return axios.get(base.baseUrl + base.updatePartner, {params})
    },
    //查询合作伙伴
    getSearchPartner(params){
        return axios.get(base.baseUrl + base.searchBPartner, {params})
    },
}

export default api